package net.xju.service.impl;

import net.xju.common.utils.PageInfo;
import net.xju.dao.UserDao;
import net.xju.entity.User;
import net.xju.service.UserService;

public class UserServiceImpl implements UserService {

    UserDao userDao = new UserDao();

//    @Override
//    public User login(String username, String password) {
//        return userDao.login(username, password);
//    }

    @Override
    public void insert(User user) {
        userDao.insert(user);
    }

    @Override
    public User selectOne(int id) {
        return userDao.selectOne(id);
    }

    @Override
    public void delete(int id) {
        userDao.delete(id);
    }

    @Override
    public void update(User user){
        userDao.update(user);
    }

    @Override
    public PageInfo<User> pageList(String username, String gender, int pageNum, int pageSize) {
        return userDao.pageList(username, gender, pageNum, pageSize);
    }

    @Override
    public User login(String username, String password, String role) {
        return userDao.login(username, password, role);
    }


}
